package com.goods.business.converter;

import com.goods.common.model.business.Consumer;
import com.goods.common.model.business.Supplier;
import com.goods.common.vo.business.ConsumerVO;
import com.goods.common.vo.business.SupplierVO;
import org.springframework.beans.BeanUtils;

/**
 * @Author: 赵勇镔
 * @Time: 2021/6/10 14:57
 * @Description:
 */
public class ConsumerConverter {


    public static ConsumerVO converterConsumerVO (Consumer consumer){
        ConsumerVO consumerVO = new ConsumerVO();
        BeanUtils.copyProperties(consumer,consumerVO);
        return consumerVO;
    }

    public static Consumer converterConsumer (ConsumerVO supplierVO){
        Consumer consumer = new Consumer();
        BeanUtils.copyProperties(supplierVO,consumer);
        return consumer;
    }
}
